package com.gitee.fastmybatis.core.support;

public class TenantContext {

    private static ThreadLocal<Object> tenantLocal = new ThreadLocal<>();

    public static void setTenantId(Object tenantId) {
        tenantLocal.set(tenantId);
    }

    public static Object getTenantId() {
        return tenantLocal.get();
    }

    public static void remove() {
        tenantLocal.remove();
    }

    public static void setTenantLocal(ThreadLocal<Object> tenantLocal) {
        TenantContext.tenantLocal = tenantLocal;
    }
}